package com.firmboy.io_collection.tool;

import java.util.ArrayList;

/**
 * 监控工具测试
 *
 * @author firmboy
 * @create 2018-03-20 下午7:05
 **/
public class ToolTest {

    static class OMMObject{
        public byte [] palceholder = new byte[64*1024];
    }

    public static void fileHeap(int num) throws InterruptedException {
        ArrayList<OMMObject> list = new ArrayList<>();
        for (int i = 0;i<num;i++){
            Thread.sleep(50);
            list.add(new OMMObject());

        }
        System.gc();
    }

    public static void main(String[] args) throws InterruptedException {
        fileHeap(1000);
    }
}
